#include "descwindow.h"

DescWindow::DescWindow(QWidget *parent,string name) : QDialog(parent)
{

    string title = "Description : " + name;
    this->setWindowTitle(QString(title.c_str()));
    edit=new QTextEdit(this);

    edit->setVisible(true);

    fin=new QPushButton("Fini",this);
    fin->move(100,200);
    fin->setVisible(true);
    connect(fin,SIGNAL(clicked()),SLOT(close()));
}
DescWindow::DescWindow(QWidget *parent,string name,string desc) : QDialog(parent)
{

    string title = "Description : " + name;
    this->setWindowTitle(QString(title.c_str()));
    edit=new QTextEdit(this);

    edit->setVisible(true);
    edit->setReadOnly(true);
    edit->setText(QString(desc.c_str()));

    fin=new QPushButton("Fini",this);
    fin->move(100,200);
    fin->setVisible(true);
    connect(fin,SIGNAL(clicked()),SLOT(close()));
}
string DescWindow::getDesc()
{
    return edit->toPlainText().toStdString();
}
